[SUBROUTINE]
version = 1.14
icon = circle.png
name = _("Circle by Center")
type = circle
help = _("<b>Create a Circle from it's center</b>&#10;Can add a flat")
order = act pv h1 cx al_x cy al_y d h2 f rot h3 opt dir s u_s ugc dpt u_dpt ugcd h4 fp fc

[PARAM_ACT]
name = _("Active")
icon = enable.png
type = bool
value = 1

[PARAM_PV]
name = _("Show design")
icon = glasses.png
type = bool
value = 1

[PARAM_H1]
name = _("Coords, size")
type = sub-header

[PARAM_CX]
name = _("cX")
type = float
icon = center.png
tool_tip = _("Center of circle")
value = 0.0
metric_value = 0.0
header = h1

[PARAM_AL_X]
name = _("X axis align")
icon = align-x.png
type = combo
options = _("Left=0:Center=1:Right=2")
header = h1
value = 1
tool_tip = _("Define X reference point")

[PARAM_CY]
name = _("cY")
type = float
icon = center.png
tool_tip = _("Center of circle")
value = 0.0
metric_value = 0.0
header = h1

[PARAM_AL_Y]
name = _("Y axis align")
icon = align-y.png
type = combo
options = _("Top=0:Center=1:Bottom=2")
header = h1
value = 1
tool_tip = _("Define Y reference point")

[PARAM_D]
name = _("Diameter")
type = float
minimum_value = 0.0
icon = diameter.png
tool_tip = _("Diameter")
value = 1.5
header = h1
metric_value = 45
not_allowed = 0

[PARAM_H2]
name = _("D flat")
type = sub-header

[PARAM_F]
name = _("Remove")
icon = d-flat.png
type = float
minimum_value = 0.0
tool_tip = _("Height to remove from diameter")
value = 0
metric_value = 0.0
header = h2

[PARAM_ROT]
name = _("Rotation")
type = float
digits = 2
icon = angle.png
tool_tip = _("Rotation of flat")
value = 0.0
header = h2
suffix = &#176;

[PARAM_H3]
name = _("Cutting")
type = sub-header

[PARAM_OPT]
name = _("Option")
type = combo
options = _("Inside=0:On the line=2:Outside=3")
icon = g4x.png
tool_tip = _("Select tool path")
value = 0
header = h3

[PARAM_DIR]
name = _("Direction")
type = combo
options = _("Clockwise=2:Counter-Clockwise=3")
icon = cw-ccw.png
tool_tip = _("Direction of path")
value = 3
header = h3

[DEFINITIONS]
content =
;	<eval>self.include_once(file name here)</eval>

[CALL]
content =
	(begin #sub_name)
	(circle from center author : Fernand Veilleux)
	o<#self_id_active> if [#param_act] (if active)
		o<select> CALL [33] [#param_al_x] [#param_d / 2] [0] [-#param_d / 2]
		o<select> CALL [34] [#param_al_y] [-#param_d / 2] [0] [#param_d / 2]
		
		o<circle> CALL [#param_cx + #33] [#param_cy + #34] [#param_d] [#param_f] [#param_rot] [#param_opt] [#param_dir] [#<pl_cut_start>] [#<surface>] [#<bottom>] [#param_pv]
	o<#self_id_active> endif
